//https://www.luogu.com.cn/problem/UVA1193
#include<iostream>
#include<cmath>
#include<algorithm>
#include<cstring>
using namespace std;
const int N=1010;
struct node
{
	double x;
	double y;
}island[N];
int main()
{
	int n,m;
	int k=0;
	while(cin>>n>>m&&!(n==0&&m==0))
	{
		k++;
		memset(island,0,sizeof(island));
		bool istrue=true;
		for(int i=1;i<=n;i++)
		{
			double x,y;cin>>x>>y;
			if(y>m)
			{
				istrue=false;
			}
			else
			{
				double del=pow(m*m-y*y,0.5);
				island[i].x=x-del;
				island[i].y=x+del;
				// cout<<island[i].x<<"  "<<island[i].y<<endl;
			}
		}
		printf("Case %d: ",k);
		if(istrue==false)
		{
			cout<<-1<<endl;
		}
		else
		{
			sort(island+1,island+n+1,[](const node&a, const node&b)
				{
					return a.x<b.x;
				});
			int ret=1;
			double r=island[1].y;
			for(int i=2;i<=n;i++)
			{
				double left=island[i].x;
				double right=island[i].y;
				if(r<left)
				{
					ret++;
					r=right;	
				}
				else
				{
					r=min(r,right);
				}
			}
			cout<<ret<<endl;
		}
	}	
}